Improve unsetting old buffer in gtk_text_view_set_buffer()
authorKristian Rietveld <kris@gtk.org>
Fri, 4 Sep 2009 11:41:17 +0000 (13:41 +0200)
committerKristian Rietveld <kris@gtk.org>
Fri, 4 Sep 2009 12:06:59 +0000 (14:06 +0200)
commitdc3fb714a08a102c0972489afd0c566b9a17cc56
treefa5b113fb94e148581cc2a0b89c5375687afc7b7
parent7a3d98324df08cce17ee0ffce74c0fa73b38ee4a
Improve unsetting old buffer in gtk_text_view_set_buffer()

When unsetting the old buffer always set the buffer on the layout to
NULL.  More importantly, clear the pending scroll.  (The scroll is
handled in an idle, when not cleared an idle handler might touch the
layout later on, possibly corrupting the BTree).  Unref the buffer after
removing the selection from the clipboard, not before.  Patch merged
from maemo-gtk.
gtk/gtktextview.c